﻿using System;
using System.Reflection;

namespace MicrobloggingInterface
{
    public class MicrobloggingFactory
    {
        public IMicroblogging GetMicrobloggingType(string assemblyName, string typeName)
        {
            IMicroblogging microblogging = null;

            try
            {
                Assembly assembly = Assembly.Load(assemblyName);
                microblogging = (IMicroblogging)assembly.CreateInstance(typeName);
            }
            catch (TypeLoadException ex)
            {
                
            }
            catch (Exception ee)
            {
 
            }

            return microblogging;
        }
    }
}
